package com.acoffee.controller;

import com.acoffee.pojo.User;
import com.acoffee.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author acoffee
 * @create 2021-11-25 16:10
 */
@RestController
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("/queryOne/{id}")
    public String queryOne(@PathVariable int id){
        User user = userService.queryOne(id);
        return user.toString();
    }
}
